Description: 0 / 1背包问题是一个N P-复杂问题,为了解决该问题,,将用回溯算法解决该问题。既然想选择一个对象的子集,将它们装入背包,以便获得的收益最大,则解空间应组织成子集树的形状(如图1 6 - 2所示)。该回溯算法与4 . 2节的装载问题很类似。首先形成一个递归算法,去找到可获得的最大收益。然后,对该算法加以改进,形成代码。改进后的代码可找到获得最大收益时包含在背包中的对象的集合。-0/1 knapsack problem is a P-complex issues, in order to solve the problem, and will be used backtracking algorithm to solve the problem. As to the choice of a subset of object, they will load a backpack, in order to obtain the greatest profits, the solution should be organized into space subset of the shape of the tree (Figure 1 6-2 below). The backtracking algorithms and 4. Two loading problem is very similar. Forming a recursive algorithm to get the maximum benefit available. Then, this algorithm is modified to form code. Improved code can be found at the maximum benefits included in the backpack of a collection of objects. Platform: |
Size: 8192 |
Author:周易 |
Hits:
Description: 自己随便写的 大家看看 最好有人帮我写个回溯算法0-1背包问题的演示软件
-own writing any of us look at the best people to help me write a backtracking algorithm 0-1 knapsack problem of presentation software Platform: |
Size: 1024 |
Author:手电筒 |
Hits:
Description: 这是一个用回溯算法解0--1背包问题的C++程序(好用的)-This is a backtracking algorithm used 0 1 knapsack problem of the C++ Procedure (useful) Platform: |
Size: 1024 |
Author:chen |
Hits:
Description: 背包问题非常有用的程序代码打包,包括贪心,回溯,动态规划-Knapsack problem is very useful package of program code, including greedy, backtracking, dynamic programming Platform: |
Size: 6128640 |
Author:adsd |
Hits:
Description: knap2
背包问题非递归,运用栈及回溯算法优化了一下,可以找到所有满足条件的解。
如果遇到什么问题,请发邮件至horsewhite32@hotmail.com,笔者将不胜感激
uuhorse-non-recursive knap2 knapsack problem, the use of stack and the backtracking algorithm to optimize the look, you can find all the solutions to meet the conditions. If any problems, please e-mail horsewhite32@hotmail.com, I would be grateful uuhorse Platform: |
Size: 6144 |
Author:uuhorse |
Hits:
Description: 用回溯解背包问题 假设有n件物品,定义一个结构体a[]来存储,结构体有两个成员weight和value(weight表示重量,value表示价值)先定义一个数组col[]表示每个物品当前状态(为1表示被选,为0表示未被选),其初值全为1,从下标为0开始遍历,当前所选物品总重和总价值分别设为tw和tv(初值均为0),背包的限重设为limit,若第i个物品满足tw+a[i].weight<=limit且col[i]==1 就将a[i].weight和value加入tw和tv,否则col[i]设为0。-Knapsack problem using backtracking solution assumption has n items, the definition of a structure a [] to store, structure, body weight and has two members value (weight, said weight, value, said value) before the definition of an array col [] mean that each and every item current status (as one said to be elected, not selected to express to 0), all of its initial value 1, from the beginning subscript 0 ergodicity, the currently selected items and the total value of gross weight, respectively, as tw and tv (early values are 0), backpack weight limit is set to limit, if paragraph i of goods to meet tw+ a [i]. weight Platform: |
Size: 180224 |
Author:STartBoy |
Hits:
Description: 01背包问题,里面有四种算法,分别为动态规划,分支限定发,回溯法和谈新算法!-01 knapsack problem, there are four kinds of algorithms, dynamic programming, respectively, branch limit hair, the new algorithm backtracking peace! Platform: |
Size: 247808 |
Author:chenchen |
Hits:
Description: 0/1背包问题的几种解法,包括回溯法、动态规划法以及穷举法。另外还包括集中方法的一个测试报告。-0/1 knapsack problem several solutions, including backtracking, dynamic programming method and the exhaustive method. It also includes a focus on methods of test reports. Platform: |
Size: 157696 |
Author:王若 |
Hits:
Description: 用蛮力法,回溯法,分支限界法求解背包问题-With the brute force method, backtracking, branch and bound method for solving knapsack problem Platform: |
Size: 1052672 |
Author:hehuiling |
Hits:
Description: 这是算法设计与分析课程实验,回溯算法实验的简单的源代码,包括回溯法背包问题,回溯符号问题。-This is the algorithm design and analysis course experiment, the experiment simple backtracking algorithm source code, including backtracking knapsack problem, the problem back symbol. Platform: |
Size: 1024 |
Author:林达 |
Hits:
Description: 这是一个关于背包问题的算法,其中使用了回溯的思想,程序可以成功运行。-The algorithm is about the Knapsack problem,it uses Backtracking algorithm , the program can be run successfully. Platform: |
Size: 1024 |
Author:小韩 |
Hits:
Description: knapsack,用回溯法背包问题,可直接在eclipse上运行。标题不小心写错了-knapsack, knapsack problem with backtracking, can be directly run in eclipse. Platform: |
Size: 7168 |
Author:康靖林 |
Hits:
Description: 原创,背包问题的四种解法,回溯法,动态规划法,以及两种蛮力法,C++代码,编译运行通过,结果正确,可以比较各种方法的效率。-The original, four solutions of the knapsack problem, backtracking, dynamic programming, and two brute force method, C++ code, compile, run through, the result is correct, you can compare the efficiency of the method. Platform: |
Size: 2451456 |
Author:ZLS |
Hits:
Description: 这是一个关于0-1背包问题算法的编程实现,包括了动态规划、分支界限、回溯、贪心算法-This is a 0-1 Knapsack Problem programming, including dynamic programming, branch and bound, backtracking, greedy algorithm Platform: |
Size: 2156544 |
Author:哈达 |
Hits: